package com.cdp.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cdp.common.core.domain.entity.SysStatisticsAnalysisModuleHistory;
import com.cdp.common.utils.SecurityUtils;
import com.cdp.system.dto.StatisticsAnalysisDTO;
import com.cdp.system.mapper.SysStatisticsAnalysisModuleHistoryMapper;
import com.cdp.system.service.SysStatisticsAnalysisModuleHistoryService;
import com.cdp.system.vo.StatisticsAnalysisVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysStatisticsAnalysisModuleHistoryServiceImpl
        extends ServiceImpl<SysStatisticsAnalysisModuleHistoryMapper, SysStatisticsAnalysisModuleHistory>
        implements SysStatisticsAnalysisModuleHistoryService {

    @Autowired
    private  SysStatisticsAnalysisModuleHistoryMapper sysStatisticsAnalysisModuleHistoryMapper;

    @Override
    public List<StatisticsAnalysisVO> queryStatisticsAnalysis(StatisticsAnalysisDTO statisticsAnalysisDTO) {

        Long userId = SecurityUtils.getUserId();
        statisticsAnalysisDTO.setUserId(userId);
        return  sysStatisticsAnalysisModuleHistoryMapper.queryStatisticsAnalysis(statisticsAnalysisDTO);
    }
}
